package com.huiyeji.hui.service;

import com.huiyeji.hui.entity.GroupUserRelation;

import java.util.List;

/**
 * @author zhaoduo
 */
public interface GroupRelationService {

    /**
     * 用户退出群聊
     * @param uid uid
     * @param gid gid
     */
    void removeMember(Long uid, Long gid);

    /**
     * 向关系表中添加群主信息
     * @param relation relation
     */
    void insertGroupOwner(GroupUserRelation relation);

    /**
     * 将某人踢出群聊
     * @param uid uid
     * @param gid gid
     * @param oid oid
     */
    void kickOutMember(Long uid, Long gid, Long oid);

    /**
     * 得到某个群聊的所有成员id
     * @param gid receiver
     * @param uid sender
     * @return List<Long>
     */
    List<Long> getGroupMembers(Long gid,Long uid);

    /**
     * 新增关系数据
     * @param relation GroupUserRelation
     */
    void addRelation(GroupUserRelation relation);

    /**
     * 删除群聊所有成员
     * @param gid gid
     */
    void removeAllMember(Long gid);
}
